.#{$devui-prefix}-dropdown {
  position: relative;
  vertical-align: middle;

  .#{$devui-prefix}-dropdown-toggle {
    box-shadow: none;
    outline: none;
  }

  .#{$devui-prefix}-dropdown-toggle.#{$devui-prefix}-dropdown-default {
    line-height: 1.5;
    padding: 4px 10px;
    border-radius: 2px;
    text-align: center;
    cursor: pointer;
    outline: 0;
    border-style: solid;
    border-width: 1px;
    display: flex;
    align-items: center;

    &:not(.#{$devui-prefix}-dropdown-item) {
      display: inline-flex !important;
    }
  }

  .#{$devui-prefix}-caret {
    display: inline-block;
    margin-left: 2px;
    vertical-align: middle;
    border-top: 4px dashed;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
  }

  &.#{$devui-prefix}-dropdown-open .#{$devui-prefix}-dropdown-toggle span.icon-chevron-down {
    transform: rotate(180deg);
  }
}

.#{$devui-prefix}-dropdown-menu {
  position: absolute;
  float: left;
  top: calc(100% - 1px);
  left: 0;
  z-index: 1000;
  min-width: calc(min(100%, 102px));
  margin: 4px 0;
  padding-bottom: 5px;
  background-clip: padding-box;
  border-radius: 2px;
  list-style: none;
  background-color: $devui-connected-overlay-bg;
  box-shadow: 0 2px 5px 0 $devui-shadow;
  outline: none;

  &.#{$devui-prefix}-dropdown-overlay,
  &.#{$devui-prefix}-dropdown-overlay.popper-container {
    border: 1px solid $devui-brand;
  }

  &.#{$devui-prefix}-dropdown-overlay.popper-container {
    margin-top: -1px;
    margin-bottom: -1px;
  }

  // .open > & {
  //   display: block;
  // }
  > li {
    position: relative;

    > a {
      height: 36px;
      padding: 0 10px;
      cursor: pointer;
      display: flex;
      align-items: center;
    }
  }

  li > input {
    margin: 0 10px;
  }

  > .disabled > a {
    color: $devui-disabled-text;
    cursor: not-allowed;

    &:hover,
    &:focus {
      cursor: not-allowed;
    }
  }

  .#{$devui-prefix}-dropdown-item:not(.disabled) {
    &:hover:not(:active) {
      background-color: $devui-list-item-hover-bg;
      color: $devui-list-item-hover-text;
    }

    &:active:hover {
      background-color: $devui-list-item-active-bg;
      color: $devui-list-item-active-text;
    }

    &.#{$devui-prefix}-dropdown-bg {
      //箭头选中
      background-color: $devui-list-item-hover-bg;
      color: $devui-list-item-hover-text;
    }

    &.active {
      color: $devui-list-item-active-text;
      background-color: $devui-list-item-active-bg;
    }
  }
}

.#{$devui-prefix}-form-group.#{$devui-prefix}-has-feedback {
  & > .#{$devui-prefix}-form-control-feedback {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    display: block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    pointer-events: none;

    &:hover {
      position: absolute;
    }

    .#{$devui-prefix}-caret {
      display: inline-block;
      margin-left: 2px;
      vertical-align: middle;
      border-top: 4px solid;
      border-right: 4px solid transparent;
      border-left: 4px solid transparent;
    }
  }
}

.form-group.has-feedback[tabindex] {
  outline: 0;
}

.#{$devui-prefix}-dropdown-no-border {
  min-height: 28px;
  min-width: calc(min(100%, 102px));
  line-height: 1.5;
  padding: 4px 10px;
  border-radius: 2px;
  text-align: center;
  outline: 0;
  background-image: none;
  text-decoration: none;
  cursor: pointer;
  background-color: $devui-connected-overlay-bg;
  color: $devui-text;
  display: flex;
  align-items: center;
  box-shadow: none;
  border: none;

  &:hover,
  &:focus {
    text-decoration: none;
  }

  &:active:hover,
  &:focus {
    color: $devui-brand-active;
  }
}

.#{$devui-prefix}-dropdown {
  .#{$devui-prefix}-dropdown-default {
    background-color: $devui-base-bg;
    color: $devui-text;
    border-color: $devui-form-control-line;

    &:active,
    &:focus,
    &:hover {
      border-color: $devui-form-control-line-hover;
    }
  }

  .#{$devui-prefix}-dropdown-menu {
    background: $devui-connected-overlay-bg;
    box-shadow: 0 2px 5px 0 $devui-shadow;

    > li > a:not(.disabled) {
      color: $devui-text;

      &:hover,
      &:focus {
        background-color: $devui-list-item-hover-bg;
      }
    }

    > .disabled > a {
      color: $devui-disabled-text;
      cursor: not-allowed;

      &:hover,
      &:focus {
        background-color: transparent;
      }
    }
  }
}
